// app.js
App({
  onLaunch() {
    console.log("app执行onLaunch函数")
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    userInfo: "null",
    Info:"运算"
  },
  add:function(a,b){
    return a+b
  },
  onShow:function(){
    console.log("app执行onShow函数")
  },
  onHide:function(){
    console.log("app执行onHide函数")
  },
  onError:function(){
    console.log("app执行onError函数")
  }
})
